#include "junix.h"

int main(int argc, char **argv)
{
	if( argc!=2)
		err_quit("Usage:%s file",argv[0]);

	struct utimbuf ut;

	if( utime(argv[1], NULL) == -1)
		err_sys("utime");

	struct stat st;
	if( stat(argv[1],&st) == -1)
		err_sys("stat");

	printf("st_atime:%ld\nst_mtime:%ld\n", st.st_atime, st.st_mtime);

	ut.actime=st.st_atime+10000;
	ut.modtime=st.st_mtime+10000;

	if( utime(argv[1], &ut) == -1)
		err_sys("utime");

	exit(0);
}

